package com.example.park_management.controller;
import com.example.park_management.entity.demoEntity;
import com.example.park_management.result.Result;
import com.example.park_management.service.DemoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/demo")
@Slf4j
public class DemoController {
 @GetMapping()

    public Result<demoEntity> demoMethod(@RequestBody demoEntity demoEntity) {

        log.info("欢迎来到demo的controller层");

        //调用方法
        DemoService.demoMethod(demoEntity);
        return Result.success();
 }

}
